<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../core/include.inc.jsp"%>

<form id="pagerForm" method="post" action="register_list">
    <input type="hidden" name="pageNum" value="${pageModel.pageNum}" />
    <input type="hidden" name="numPerPage" value="${pageModel.numPerPage}" />
    <input type="hidden" name="blockId" value="${register.blockId}" />
    <input type="hidden" name="nickname" value="${register.nickname}" />
</form>

<form onsubmit="return navTabSearch(this);" action="register_list" method="post">
<div class="pageHeader">
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label>小区</label>
                    <select class="combox" id="register_block_id" name="blockId">
                        <option value="0">全部小区</option>
                        <c:forEach items="${blocks}" var="block">
                            <option value="${block.id}">${block.blockName}</option>
                        </c:forEach>
                    </select>
                </li>
                <li>
                    <label>手机号</label>
                    <input type="text" name="phone" value="${register.phone}" class="textInput" />
                </li>
                <li>
                    <label>昵称</label>
                    <input type="text" name="nickname" value="${register.nickname}" class="textInput" />
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                </ul>
            </div>
        </div>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <%--<li><a class="add" href="" target="dialog" rel="to_module_add"--%>
                   <%--width="600" height="400" mask="true"><span>导出excel</span></a></li>--%>
            <%--<li class="line">line</li>--%>

        </ul>
    </div>
    <table class="table" width="100%" layoutH="137">
        <thead>
        <tr>
            <th>序号</th>
            <th>小区名称</th>
            <th>昵称</th>
            <th>手机号</th>
            <th>楼栋号</th>
            <th>单元</th>
            <th>门牌号</th>
            <th>注册时间</th>
        </tr>
        </thead>
        <tbody>
            <c:forEach var="item" items="${list}" varStatus="st">
                <tr target="item_id" rel="${item.id}" ondblclick="tableclick()">
                    <td>${st.index+1}</td>
                    <td>${item.block.blockName}</td>
                    <td>${item.nickname}</td>
                    <td>${item.phone}</td>
                    <td>${item.building}</td>
                    <td>${item.unit}</td>
                    <td>${item.house}</td>
                    <td>
                        <fmt:formatDate value="${item.registerTime}" pattern="yyyy-MM-dd HH:mm"/>
                    </td>
                </tr>
            </c:forEach>
        </tbody>
    </table>

    <c:import url="../core/pagebar.inc.jsp" />

</div>
</form>
<script>
    $('#register_block_id').val('${register.blockId}');
</script>


